<template>
    <div>
        <h2>显示</h2>
        <table border="1">
            <tbody>
                <tr>
                    <td>会员用户名</td>
                    <td>会员手机号</td>
                    <td>会员性别</td>
                    <td>会员状态</td>
                    <td>操作</td>
                </tr>
                <tr v-for="item in info">
                    <td>{{info.Name}}</td>
                    <td>{{info.Phone}}</td>
                    <td>{{info.Sex}}</td>
                    <td>{{info.State}}</td>
                    <td></td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import{ref,reactive,onMounted}from 'vue';
import axios from 'axios';
import { useRouter } from 'vue-router';

const info=ref({
    Name:'',
    Pwd:'',
    Phone:'',
    Sex:'',
    State:true
})

onMounted(()=>{
    getlist();
})

const getlist=()=>{
axios.get('https://localhost:7064/api/Member/GetMember')
.then(res=>{
    console.log(res);
    info.value.Name=res.data.data;
})
.catch(err=>{
    console.log(err);
})

}

</script>

<style scoped>

</style>